EasyExtend.util.Enum.EnumMetaclass

EasyExtend :: util :: Enum :: EnumMetaclass :: Class EnumMetaclass |
[hide private]
[frames] | no frames]

# Type EnumMetaclass

    object --+
             |
          type --+
                 |
                EnumMetaclass

    Metaclass for enumeration.

    To define your own enumeration, do something like

    class Color(Enum):
        red = 1
        green = 2
        blue = 3

    Now, Color.red, Color.green and Color.blue behave totally
    different: they are enumerated values, not integers.

    Enumerations cannot be instantiated; however they can be
    subclassed.

Instance Methods | [hide private]
__init__(cls, name, bases, dict) x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
__getattr__(cls, name) |
__repr__(cls) repr(x) |
Inherited from `type`: `__call__`, `__cmp__`, `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__setattr__`, `__subclasses__`, `mro` Inherited from `object`: `__reduce__`, `__reduce_ex__`, `__str__`

Properties | [hide private]
Inherited from `type`: `__base__`, `__bases__`, `__basicsize__`, `__dictoffset__`, `__flags__`, `__itemsize__`, `__mro__`, `__name__`, `__weakrefoffset__` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(cls, name, bases, dict) (Constructor) |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### __repr__(cls) (Representation operator) |
repr(x) Overrides: object.__repr__ (inherited documentation)